Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if imported file is a proper external module for imported node typings #4738

Merged
merged 4 commits into from
Sep 11, 2015

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Sep 10, 2015

No description provided.

* - use top level imports\exports
* - don't use tripleslash references
*/
shouldBeProperExternalModule?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this should be declarative. i.e. the name tells you what it is rather than telling you how it should be have. so something like
isExternalLibrary, or isExternalLibraryImport

@mhegazy
Copy link
Contributor

mhegazy commented Sep 10, 2015

also looks like you have build error.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 11, 2015

👍

vladima added a commit that referenced this pull request Sep 11, 2015
Check if imported file is a proper external module for imported node typings
@vladima vladima merged commit 026632b into master Sep 11, 2015
@vladima vladima deleted the properExternalModules branch September 11, 2015 17:20
@vladima
Copy link
Contributor Author

vladima commented Sep 12, 2015

pinging @basarat and @jbrantly: FYI, this PR has changed the signature of CompilerHost.resolveModuleNames to return ResolvedModule instead of string

@jbrantly
Copy link

Thanks for the heads up

@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Sep 12, 2015
@mhegazy mhegazy added this to the TypeScript 1.6.2 milestone Sep 12, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Sep 12, 2015

@vladima can you comment this issue in the API breaking changes page

==== tests/cases/compiler/b.ts (1 errors) ====
import y = require("a");
~~~
!!! error TS2306: File 'index.d.ts' is not a module.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this would be a good case of having the "Please contact the package author to update the package definition." message.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point, will update the message. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Breaking Change Would introduce errors in existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants